<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>账户安全 - 拖拽式建站平台</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        :root {
            --sidebar-width: 240px;
            --header-height: 64px;
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --bg-color: #f5f6f7;
            --card-bg: #ffffff;
            --text-primary: #18191c;
            --text-secondary: #61666d;
            --text-muted: #9499a0;
            --border-color: #e3e5e7;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        /* 顶部导航栏 */
        .header {
            height: var(--header-height);
            background: var(--card-bg);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            border-bottom: 1px solid var(--border-color);
            z-index: 100;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .sidebar-toggle {
            margin-right: 16px;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 18px;
        }

        .logo {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        .logo i {
            margin-right: 10px;
            color: var(--primary-color);
        }

        .header-right {
            display: flex;
            align-items: center;
        }

        .header-action {
            margin-left: 16px;
            color: var(--text-secondary);
            cursor: pointer;
            position: relative;
        }

        .header-action:hover {
            color: var(--primary-color);
        }

        .badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--danger-color);
            color: white;
            font-size: 11px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-menu {
            display: flex;
            align-items: center;
            margin-left: 20px;
            cursor: pointer;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 12px;
        }

        /* 主内容区域 */
        .main-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        /* 侧边栏 */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--card-bg);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
            transition: all 0.3s ease;
        }

        .sidebar-menu {
            padding: 16px 0;
        }

        .menu-title {
            padding: 10px 20px;
            font-size: 13px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.3s ease;
            border-left: 3px solid transparent;
        }

        .menu-item:hover {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
        }

        .menu-item.active {
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            border-left-color: var(--primary-color);
        }

        .menu-item i {
            margin-right: 12px;
            width: 18px;
            text-align: center;
        }

        /* 内容区域 */
        .content {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .page-title {
            font-size: 24px;
            font-weight: 600;
        }

        .page-actions .btn {
            margin-left: 10px;
        }

        /* 安全概览卡片 */
        .security-overview {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 24px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            margin-bottom: 24px;
            display: flex;
            align-items: center;
        }

        .security-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-right: 20px;
        }

        .security-content {
            flex: 1;
        }

        .security-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .security-description {
            color: var(--text-secondary);
            margin-bottom: 12px;
        }

        .security-strength {
            display: flex;
            align-items: center;
        }

        .strength-label {
            font-size: 14px;
            color: var(--text-secondary);
            margin-right: 12px;
        }

        .strength-meter {
            flex: 1;
            height: 6px;
            background: var(--border-color);
            border-radius: 3px;
            overflow: hidden;
        }

        .strength-value {
            height: 100%;
            background: var(--success-color);
            width: 75%;
        }

        .strength-text {
            margin-left: 12px;
            font-size: 14px;
            font-weight: 500;
            color: var(--success-color);
        }

        /* 卡片网格布局 */
        .cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .card {
            background: var(--card-bg);
            border-radius: 4px;
            padding: 20px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .card-title {
            font-size: 16px;
            font-weight: 500;
            display: flex;
            align-items: center;
        }

        .card-title i {
            margin-right: 8px;
            color: var(--primary-color);
        }

        .card-status {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-enabled {
            background: rgba(39, 174, 96, 0.1);
            color: var(--success-color);
        }

        .status-disabled {
            background: rgba(231, 76, 60, 0.1);
            color: var(--danger-color);
        }

        .status-warning {
            background: rgba(243, 156, 18, 0.1);
            color: var(--warning-color);
        }

        /* 表单样式 */
        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            font-weight: 500;
        }

        .form-input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }

        .form-text {
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .form-check {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }

        .form-check-input {
            margin-right: 8px;
        }

        .form-check-label {
            font-size: 14px;
            color: var(--text-secondary);
        }

        /* 设备列表 */
        .device-list {
            list-style: none;
        }

        .device-item {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .device-item:last-child {
            border-bottom: none;
        }

        .device-icon {
            width: 40px;
            height: 40px;
            border-radius: 8px;
            background: rgba(52, 152, 219, 0.1);
            color: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .device-info {
            flex: 1;
        }

        .device-name {
            font-weight: 500;
            margin-bottom: 4px;
        }

        .device-details {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .device-actions {
            display: flex;
            gap: 8px;
        }

        /* 会话列表 */
        .session-list {
            list-style: none;
        }

        .session-item {
            padding: 12px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .session-item:last-child {
            border-bottom: none;
        }

        .session-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .session-location {
            font-weight: 500;
        }

        .session-date {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .session-details {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .session-info {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .session-status {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        /* 按钮样式 */
        .btn {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn i {
            margin-right: 6px;
        }

        .btn-primary {
            background: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background: #2980b9;
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .btn-outline:hover {
            background: #f5f7fa;
        }

        .btn-success {
            background: var(--success-color);
            color: white;
        }

        .btn-success:hover {
            background: #219653;
        }

        .btn-danger {
            background: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background: #c0392b;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 13px;
        }

        /* 模态框 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: var(--card-bg);
            border-radius: 8px;
            width: 100%;
            max-width: 500px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 18px;
            font-weight: 600;
        }

        .modal-close {
            color: var(--text-muted);
            cursor: pointer;
            font-size: 20px;
        }

        .modal-close:hover {
            color: var(--text-primary);
        }

        .modal-body {
            padding: 20px;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        /* 响应式设计 */
        @media (max-width: 992px) {
            .sidebar {
                position: fixed;
                left: -var(--sidebar-width);
                top: var(--header-height);
                bottom: 0;
                z-index: 90;
            }

            .sidebar.open {
                left: 0;
            }

            .overlay {
                position: fixed;
                top: var(--header-height);
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 80;
                display: none;
            }

            .overlay.open {
                display: block;
            }
        }

        @media (max-width: 768px) {
            .cards-grid {
                grid-template-columns: 1fr;
            }

            .security-overview {
                flex-direction: column;
                text-align: center;
            }

            .security-icon {
                margin-right: 0;
                margin-bottom: 16px;
            }

            .security-strength {
                flex-direction: column;
                align-items: stretch;
            }

            .strength-label {
                margin-right: 0;
                margin-bottom: 8px;
            }

            .strength-text {
                margin-left: 0;
                margin-top: 8px;
                text-align: center;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
            }

            .page-actions {
                margin-top: 16px;
                width: 100%;
                display: flex;
                justify-content: space-between;
            }

            .page-actions .btn {
                margin-left: 0;
                flex: 1;
                margin: 0 5px;
            }
        }
    </style>
</head>

<body>
    <!-- 顶部导航栏 -->
    <div class="header">
        <div class="header-left">
            <div class="sidebar-toggle">
                <i class="fas fa-bars"></i>
            </div>
            <div class="logo">
                <i class="fas fa-puzzle-piece"></i>
                拖拽建站平台
            </div>
        </div>

        <div class="header-right">
            <div class="header-action">
                <i class="fas fa-bell"></i>
                <span class="badge">3</span>
            </div>

            <div class="header-action">
                <i class="fas fa-envelope"></i>
                <span class="badge">5</span>
            </div>

            <div class="user-menu">
                <span>张三</span>
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区域 -->
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-menu">
                <div class="menu-title">用户中心</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-user-circle"></i>
                    <span>个人信息</span>
                </a>
                <a href="#" class="menu-item active">
                    <i class="fas fa-shield-alt"></i>
                    <span>账户安全</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-globe"></i>
                    <span>我的网站</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-file-alt"></i>
                    <span>我的页面</span>
                </a>

                <div class="menu-title">内容管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-newspaper"></i>
                    <span>我的文章</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-box"></i>
                    <span>我的产品</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-images"></i>
                    <span>我的媒体</span>
                </a>

                <div class="menu-title">交易管理</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-credit-card"></i>
                    <span>我的订单</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-money-bill-wave"></i>
                    <span>支付记录</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-gift"></i>
                    <span>优惠券</span>
                </a>

                <div class="menu-title">消息中心</div>
                <a href="#" class="menu-item">
                    <i class="fas fa-bell"></i>
                    <span>消息通知</span>
                </a>
                <a href="#" class="menu-item">
                    <i class="fas fa-comments"></i>
                    <span>站内信</span>
                </a>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="content">
            <div class="page-header">
                <h1 class="page-title">账户安全</h1>
                <div class="page-actions">
                    <button class="btn btn-outline">
                        <i class="fas fa-history"></i> 安全日志
                    </button>
                    <button class="btn btn-primary">
                        <i class="fas fa-sync-alt"></i> 刷新
                    </button>
                </div>
            </div>

            <!-- 安全概览 -->
            <div class="security-overview">
                <div class="security-icon">
                    <i class="fas fa-shield-alt"></i>
                </div>
                <div class="security-content">
                    <div class="security-title">账户安全状况良好</div>
                    <div class="security-description">您的账户已启用多项安全保护措施，建议定期检查并更新安全设置。</div>
                    <div class="security-strength">
                        <div class="strength-label">安全强度:</div>
                        <div class="strength-meter">
                            <div class="strength-value"></div>
                        </div>
                        <div class="strength-text">强</div>
                    </div>
                </div>
            </div>

            <!-- 卡片网格 -->
            <div class="cards-grid">
                <!-- 密码安全卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-key"></i>
                            登录密码
                        </div>
                        <div class="card-status status-enabled">已设置</div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">当前密码强度</label>
                        <div style="display: flex; align-items: center;">
                            <div
                                style="flex: 1; height: 6px; background: var(--border-color); border-radius: 3px; overflow: hidden; margin-right: 10px;">
                                <div style="height: 100%; width: 80%; background: var(--success-color);"></div>
                            </div>
                            <span style="font-size: 13px; color: var(--success-color);">强</span>
                        </div>
                    </div>
                    <div class="form-text">最后更新: 2023-07-15</div>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;"
                        onclick="openModal('passwordModal')">
                        <i class="fas fa-edit"></i> 修改密码
                    </button>
                </div>

                <!-- 双重认证卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-mobile-alt"></i>
                            双重认证
                        </div>
                        <div class="card-status status-enabled">已启用</div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">认证方式</label>
                        <div style="font-size: 14px;">Authenticator应用</div>
                    </div>
                    <div class="form-text">最后使用: 2023-09-05 10:30</div>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;"
                        onclick="openModal('twoFactorModal')">
                        <i class="fas fa-cog"></i> 管理双重认证
                    </button>
                </div>

                <!-- 安全手机卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-phone"></i>
                            安全手机
                        </div>
                        <div class="card-status status-enabled">已绑定</div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">手机号码</label>
                        <div style="font-size: 14px;">138****8000</div>
                    </div>
                    <div class="form-text">可用于登录、找回密码和接收安全通知</div>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;"
                        onclick="openModal('phoneModal')">
                        <i class="fas fa-sync-alt"></i> 更换手机号
                    </button>
                </div>

                <!-- 安全邮箱卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-envelope"></i>
                            安全邮箱
                        </div>
                        <div class="card-status status-enabled">已绑定</div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">邮箱地址</label>
                        <div style="font-size: 14px;">zh****@example.com</div>
                    </div>
                    <div class="form-text">可用于登录、找回密码和接收安全通知</div>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;"
                        onclick="openModal('emailModal')">
                        <i class="fas fa-sync-alt"></i> 更换邮箱
                    </button>
                </div>

                <!-- 登录设备管理卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-laptop"></i>
                            登录设备管理
                        </div>
                    </div>
                    <ul class="device-list">
                        <li class="device-item">
                            <div class="device-icon">
                                <i class="fas fa-desktop"></i>
                            </div>
                            <div class="device-info">
                                <div class="device-name">Windows PC</div>
                                <div class="device-details">Chrome · 北京市</div>
                            </div>
                            <div class="device-actions">
                                <button class="btn btn-sm btn-outline">下线</button>
                            </div>
                        </li>
                        <li class="device-item">
                            <div class="device-icon">
                                <i class="fas fa-mobile-alt"></i>
                            </div>
                            <div class="device-info">
                                <div class="device-name">iPhone 12</div>
                                <div class="device-details">Safari · 上海市</div>
                            </div>
                            <div class="device-actions">
                                <button class="btn btn-sm btn-outline">下线</button>
                            </div>
                        </li>
                    </ul>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;">
                        <i class="fas fa-list"></i> 查看所有设备
                    </button>
                </div>

                <!-- 登录历史卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-history"></i>
                            登录历史
                        </div>
                    </div>
                    <ul class="session-list">
                        <li class="session-item">
                            <div class="session-header">
                                <div class="session-location">北京市</div>
                                <div class="session-date">今天 10:30</div>
                            </div>
                            <div class="session-details">
                                <div class="session-info">Windows · Chrome</div>
                                <div class="session-status status-enabled">成功</div>
                            </div>
                        </li>
                        <li class="session-item">
                            <div class="session-header">
                                <div class="session-location">上海市</div>
                                <div class="session-date">昨天 15:45</div>
                            </div>
                            <div class="session-details">
                                <div class="session-info">iPhone · Safari</div>
                                <div class="session-status status-enabled">成功</div>
                            </div>
                        </li>
                        <li class="session-item">
                            <div class="session-header">
                                <div class="session-location">广州市</div>
                                <div class="session-date">2023-09-03 08:20</div>
                            </div>
                            <div class="session-details">
                                <div class="session-info">Android · Chrome</div>
                                <div class="session-status status-enabled">成功</div>
                            </div>
                        </li>
                    </ul>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;">
                        <i class="fas fa-clock"></i> 查看完整历史
                    </button>
                </div>

                <!-- 安全通知卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-bell"></i>
                            安全通知
                        </div>
                    </div>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="loginNotify" checked>
                        <label class="form-check-label" for="loginNotify">新设备登录通知</label>
                    </div>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="passwordChangeNotify" checked>
                        <label class="form-check-label" for="passwordChangeNotify">密码修改通知</label>
                    </div>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="securityChangeNotify" checked>
                        <label class="form-check-label" for="securityChangeNotify">安全设置变更通知</label>
                    </div>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="newsletterNotify">
                        <label class="form-check-label" for="newsletterNotify">安全资讯和提示</label>
                    </div>
                    <button class="btn btn-primary" style="width: 100%; margin-top: 12px;">
                        <i class="fas fa-save"></i> 保存设置
                    </button>
                </div>

                <!-- 账户恢复卡片 -->
                <div class="card">
                    <div class="card-header">
                        <div class="card-title">
                            <i class="fas fa-life-ring"></i>
                            账户恢复
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">恢复邮箱</label>
                        <div style="font-size: 14px;">recovery@example.com</div>
                    </div>
                    <div class="form-text">在无法访问账户时用于恢复账户</div>
                    <div class="form-group">
                        <label class="form-label">恢复问题</label>
                        <div style="font-size: 14px;">您已设置3个安全问题和答案</div>
                    </div>
                    <button class="btn btn-outline" style="width: 100%; margin-top: 12px;"
                        onclick="openModal('recoveryModal')">
                        <i class="fas fa-cog"></i> 管理恢复选项
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- 移动端遮罩层 -->
    <div class="overlay"></div>

    <!-- 修改密码模态框 -->
    <div id="passwordModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <div class="modal-title">修改密码</div>
                <div class="modal-close" onclick="closeModal('passwordModal')">&times;</div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="form-label">当前密码</label>
                    <input type="password" class="form-input" placeholder="请输入当前密码">
                </div>
                <div class="form-group">
                    <label class="form-label">新密码</label>
                    <input type="password" class="form-input" placeholder="请输入新密码">
                    <div class="form-text">密码至少8个字符，包含字母、数字和特殊字符</div>
                </div>
                <div class="form-group">
                    <label class="form-label">确认新密码</label>
                    <input type="password" class="form-input" placeholder="请再次输入新密码">
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeModal('passwordModal')">取消</button>
                <button class="btn btn-primary">确认修改</button>
            </div>
        </div>
    </div>

    <!-- 双重认证模态框 -->
    <div id="twoFactorModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <div class="modal-title">管理双重认证</div>
                <div class="modal-close" onclick="closeModal('twoFactorModal')">&times;</div>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="form-label">当前状态</label>
                    <div
                        style="padding: 8px 12px; background: rgba(39, 174, 96, 0.1); color: var(--success-color); border-radius: 4px;">
                        <i class="fas fa-check-circle"></i> 已启用 Authenticator 应用
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">备用验证码</label>
                    <div style="display: flex;">
                        <input type="text" class="form-input" value="KR7H 92MX" style="flex: 1;" readonly>
                        <button class="btn btn-outline" style="margin-left: 8px;">复制</button>
                    </div>
                    <div class="form-text">在无法使用Authenticator应用时使用</div>
                </div>
                <div class="form-check">
                    <input type="checkbox" class="form-check-input" id="backupCodes" checked>
                    <label class="form-check-label" for="backupCodes">已生成备用验证码</label>
                </div>
                <div class="form-check">
                    <input type="checkbox" class="form-check-input" id="rememberDevice" checked>
                    <label class="form-check-label" for="rememberDevice">信任此设备30天</label>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeModal('twoFactorModal')">取消</button>
                <button class="btn btn-danger">禁用双重认证</button>
                <button class="btn btn-primary">保存设置</button>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function () {
            // 侧边栏切换
            const sidebarToggle = document.querySelector('.sidebar-toggle');
            const sidebar = document.querySelector('.sidebar');
            const overlay = document.querySelector('.overlay');

            sidebarToggle.addEventListener('click', function () {
                sidebar.classList.toggle('open');
                overlay.classList.toggle('open');
            });

            overlay.addEventListener('click', function () {
                sidebar.classList.remove('open');
                overlay.classList.remove('open');
            });

            // 导航菜单项点击
            const menuItems = document.querySelectorAll('.menu-item');

            menuItems.forEach(item => {
                item.addEventListener('click', function (e) {
                    e.preventDefault();
                    menuItems.forEach(i => i.classList.remove('active'));
                    this.classList.add('active');

                    // 这里可以添加加载对应页面内容的代码
                    const pageName = this.querySelector('span').textContent;
                    document.querySelector('.page-title').textContent = pageName;
                    console.log('切换到: ' + pageName);
                });
            });
        });

        // 模态框控制函数
        function openModal(modalId) {
            document.getElementById(modalId).style.display = 'flex';
        }

        function closeModal(modalId) {
            document.getElementById(modalId).style.display = 'none';
        }

        // 点击模态框外部关闭
        window.onclick = function (event) {
            if (event.target.classList.contains('modal')) {
                event.target.style.display = 'none';
            }
        }
    </script>
</body>

</html>